import 'package:enterprise_v6_app/app/core/core.dart';
import 'package:enterprise_v6_app/app/data/entities/application/productive_process/productive_base_page_entity.dart';
import 'package:enterprise_v6_app/router/app_pages.dart';

///生产过程
class ProductiveProcessController extends GetxController {
  //初始化生产过程
  final productiveList = [
    ProductiveBasePage(
      title: '重大危险源',
      image: AppImages.icon_major_hazard_base,
      icon: AppImages.icon_base_right_arrow,
    ),
    ProductiveBasePage(
      title: '危险化学品',
      image: AppImages.icon_hazarhous_chemicals,
      icon: AppImages.icon_base_right_arrow,
    ),
    ProductiveBasePage(
      title: '危险化工工艺',
      image: AppImages.icon_hazardous_chemical_processes_new,
      icon: AppImages.icon_base_right_arrow,
    ),
  ];

  ///点击生产过程条目
  void onClickItem(ProductiveBasePage e) {
    switch (e.title) {
      case '重大危险源':
        Get.toNamed(
          AppRoutes.majorHazardBase,
        );
        break;
      case '危险化学品':
        Get.toNamed(
          AppRoutes.hazardousChemicals,
        );
        break;
      case '危险化工工艺':
        Get.toNamed(
          AppRoutes.hazardousChemicalProcessesPage,
        );
        break;
      default:
        break;
    }
  }
}
